package com.office.meeting.mapper;

import com.office.meeting.domain.MeetingReport;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: 柒月
 * @date: 2025/6/27 下午4:11
 * @version: 1.0
 */
public interface MeetingUserMapper {

    /**
     *
     * @param loginUserId 当前登录的用户
     * @return 获取本月会议数
     */
    Long selectMonthlyCount(Long loginUserId);

    /**
     *
     * @param loginUserId 当前登录的用户
     * @return 本月参加的人数
     */
    Long selectPepopleCount(Long loginUserId);

    /**
     *
     * @param loginUserId 当前登录的用户
     * @return 分页后的最近的会议信息
     */
    List<MeetingReport> selectAllMeetingInfo(Long loginUserId);

    /**
     *
     * @param loginUserId 当前登录的用户
     * @return 我参与的会议的信息
     */
    @Select("select " +
            "id, meeting_name, start_time,password,meeting_launch_date,end_time " +
            "from conference_invitation where user_id = #{loginUserId} and state = 0 order by start_time desc")
    List<MeetingReport> selectParticipateMeeting(long loginUserId);
}
